home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.StyleChat / DTS.StyleChat.make < prev    next >
Encoding:
Text File  |  1994-05-18  |  9.1 KB  |  225 lines  |  [TEXT/MPS ]

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Sample Application
  6. #
  7. #    Program:    DTS.StyleChat
  8. #    File:        DTS.StyleChat.make    -    Make Source
  9. #
  10. #    Copyright © 1988-1994 Apple Computer, Inc.
  11. #    All rights reserved.
  12. #
  13. #------------------------------------------------------------------------------
  14.  
  15. #    The are three possible ways of making DTS.StyleChat with this makefile
  16. #        1) 68K only
  17. #        2) PowerPC only
  18. #        3) "Fat" - both 68K and PowerPC
  19. #    You can control which gets build using the dependency line for "AppName"
  20. #    The default is to build the fat version.  See instructions below.
  21. AppName            =    'DTS.StyleChat'
  22. Signature        =    'DTSC'
  23.  
  24. DTS.Lib.folder    =    "::DTS.Lib:"
  25. DTS.Lib.hdrs    =    "::DTS.Lib:DTS.Lib.headers:"
  26. projsrc            =    :
  27. obj                =     :OBJECT:
  28. objppc            =     :OBJECTPPC:
  29.  
  30. #------------------------------------------------------------------------------
  31. # Options for our compilers:
  32. #    -sym on: tells the compilers and linker to emit symbol information for
  33. #        a source level debugger, such as SADE.
  34. #    -i {DTS.Lib.hdrs}: means to look for any #include files in the specified
  35. #        directory, as well as the normal set.
  36. #    -r: tells the C compiler to require function prototypes.
  37. #    -mbg off: tells the compilers to not emit low-level debugger names. This
  38. #        saves on file space, but you may wish to remove this option if you
  39. #        need to debug with something like Macsbug.
  40. #    -rd: for Rez means to suppress warnings for redeclared types (we redeclare
  41. #        'RECT' because it’s not included in MPW 3.0).
  42. #    -append: means to add the resources to the target file, rather than
  43. #        deleting all the ones that are there first.
  44. #    -d Signature...: is a way of passing our application's signature to Rez.
  45. #        With this mechanism, we can define our signature here, and export
  46. #        it to Rez, so that we don't have to declare it there, too.
  47. #    -sn STDCLIB=Main: puts all the routines that would normally go into the
  48. #        STDCLIB segment into the Main segment. This is done so that when we
  49. #        call upon any low-level utilities, we don't potentially move memory
  50. #        by loading in a segment.
  51. #------------------------------------------------------------------------------
  52.  
  53. #    SymOptions and OptOptions are mutually exclusive.  Enable as appropriate
  54. SymOptions        =    -sym on                # turn this on to debug with SADE/R2Db
  55. COptOptions        =    #-opt on
  56. PPCCOptOptions    =    #-opt speed
  57.  
  58. # CIncludesFolder needs to be set to your Universal Interfaces folder
  59. CIncludesFolder    =    -i "{PPCCIncludes}"
  60. IncludesFolders    =    -i {DTS.Lib.hdrs}
  61. COptions        =    {IncludesFolders} {CIncludesFolder} {SymOptions} {COptOptions} -r -mbg on
  62. PPCCOptions        =    {IncludesFolders} {SymOptions} {PPCCOptOptions} -w conformance -appleext on
  63. RezOptions        =    {IncludesFolders} -rd -append -d Signature="{Signature}" -d AppName='"DTS.StyleChat"'
  64. LinkOptions        =    {SymOptions} {SegmentMappings} -msg nodup
  65. LinkOptionsPPC    =    {SymOptions} -main main
  66. MakeSymOptions    =    -i {DTS.Lib.folder} -r
  67. #    The -w options for MakePef makes those libraries "weak" imports, meaning
  68. #        they can be absent at runtime.  The app must check before calling them.
  69. MakePefOptions    =    -l QuickTimeLib.xcoff=QuickTimeLib~ ∂
  70.                         -w QuickTimeLib:AddMovieResource ∂
  71.                         -w QuickTimeLib:ClearMovieChanged ∂
  72.                         -w QuickTimeLib:CloseMovieFile ∂
  73.                         -w QuickTimeLib:CreateMovieFile ∂
  74.                         -w QuickTimeLib:DisposeMovie ∂
  75.                         -w QuickTimeLib:EnterMovies ∂
  76.                         -w QuickTimeLib:GetMoviesError ∂
  77.                         -w QuickTimeLib:NewMovie ∂
  78.                         -w QuickTimeLib:NewMovieFromFile ∂
  79.                         -w QuickTimeLib:OpenMovieFile ∂
  80.                         -w QuickTimeLib:StandardGetFilePreview ∂
  81.                         -w QuickTimeLib:UpdateMovieResource ∂
  82.                         -l InterfaceLib.xcoff=InterfaceLib
  83. SegmentMappings    =    -sn INTENV=Main ∂
  84.                     -sn PASLIB=Main ∂
  85.                     -sn STDCLIB=Main ∂
  86.                     -sn SANELIB=Main ∂
  87.                     -sn StringUtils=Main ∂
  88.                     -sn UtilMain=Main
  89.  
  90. #------------------------------------------------------------------------------
  91. # These are modified default build rules.  This is necessary to take into
  92. # account differences between MPW 3.1 and 3.2
  93. #------------------------------------------------------------------------------
  94. {obj}            ƒ    {projsrc}
  95.  
  96. .c.o            ƒ    .c
  97.     {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  98.  
  99. {objppc}        ƒ    {projsrc}
  100.  
  101. .o                ƒ    .c
  102.     PPCC {PPCCOptions} {DepDir}{Default}.c -o {TargDir}{Default}.o
  103.  
  104. #------------------------------------------------------------------------------
  105. # These are the objects that we want to link with. If any one of these
  106. # changes, then we invoke the Link command.
  107. #------------------------------------------------------------------------------
  108. AppObjects        =    ∂
  109.                     {obj}AECustom.c.o ∂
  110.                     {obj}DoEvent.c.o ∂
  111.                     {obj}EventLoop.c.o ∂
  112.                     {obj}File.c.o ∂
  113.                     {obj}IdleTasks.c.o ∂
  114.                     {obj}Menu.c.o ∂
  115.                     {obj}Start.c.o ∂
  116.                     {obj}TRootObj.c.o ∂
  117.                     {obj}Window.c.o ∂
  118.                     {obj}WindowDialog.c.o ∂
  119.                     {obj}WindowPalette.c.o
  120.  
  121. AppObjectsPPC    =    ∂
  122.                     {objppc}AECustom.o ∂
  123.                     {objppc}DoEvent.o ∂
  124.                     {objppc}EventLoop.o ∂
  125.                     {objppc}File.o ∂
  126.                     {objppc}IdleTasks.o ∂
  127.                     {objppc}Menu.o ∂
  128.                     {objppc}Start.o ∂
  129.                     {objppc}TRootObj.o ∂
  130.                     {objppc}Window.o ∂
  131.                     {objppc}WindowDialog.o ∂
  132.                     {objppc}WindowPalette.o
  133.  
  134. #------------------------------------------------------------------------------
  135. # These help define the libraries that we want to link with. {AppObjects} holds
  136. # the names of the application units we want to link together. {Libs68K} and
  137. # {LibsPPC} hold the DTS.Lib and System library files we need to link with.
  138. #------------------------------------------------------------------------------
  139. Libs68K            =    ∂
  140.                     "{Libraries}Runtime.o" ∂
  141.                     "{DTS.Lib.folder}DTS.Lib_controls" ∂
  142.                     "{DTS.Lib.folder}DTS.Lib_ctlhandler" ∂
  143.                     "{DTS.Lib.folder}DTS.Lib_framework" ∂
  144.                     "{DTS.Lib.folder}DTS.Lib_strings" ∂
  145.                     "{DTS.Lib.folder}DTS.Lib_treeobj" ∂
  146.                     "{DTS.Lib.folder}DTS.Lib_utils" ∂
  147.                     "{Libraries}Interface.o"
  148.  
  149. LibsPPC            =    ∂
  150.                     "{DTS.Lib.folder}DTS.Lib_controls.PPC" ∂
  151.                     "{DTS.Lib.folder}DTS.Lib_ctlhandler.PPC" ∂
  152.                     "{DTS.Lib.folder}DTS.Lib_framework.PPC" ∂
  153.                     "{DTS.Lib.folder}DTS.Lib_strings.PPC" ∂
  154.                     "{DTS.Lib.folder}DTS.Lib_treeobj.PPC" ∂
  155.                     "{DTS.Lib.folder}DTS.Lib_utils.PPC" ∂
  156.                     "{PPCLibraries}"QuickTimeLib.xcoff ∂
  157.                     "{PPCLibraries}"InterfaceLib.xcoff ∂
  158.                     "{PPCLibraries}"PPCCRuntime.o
  159.  
  160.  
  161. #------------------------------------------------------------------------------
  162. # Dependencies for the individual components. These will invoke the
  163. # default build rules listed in Chapter 9 of the MPW 3.0 manual.
  164. # You may wish to reduce the number of dependencies.  Two dependencies
  165. # you may wish to remove are this makefile and the .protos file.
  166. # For the .protos file, if you add a function to the list of
  167. # functions in .protos, you will cause all the source files to be
  168. # recompiled.  This may be more than you want to wait for each time you
  169. # add a function to your application.  On the other hand, if you do not
  170. # include this in the dependencies, and you change the parameters for a
  171. # function, and make the respective change to .protos, any files
  172. # that reference that function will not be recompiled.  If these files are
  173. # recompiled, the prototype checking will catch any cases where you did
  174. # not change the way the altered function was called.  <<You choose>>
  175. #------------------------------------------------------------------------------
  176.  
  177. {AppObjects}    ƒ    #{AppName}.make ∂
  178. #                    App.h ∂
  179. #                    App.protos.h
  180.  
  181. #    This rule controls how the final app is built.
  182. #    By depending on both App68K and AppPPC, the "fat" version
  183. #    gets built.  To build 68K only or PowerPC only, remove the other
  184. #    dependency.
  185. {AppName}            ƒƒ AppRez App68K AppPPC
  186.     SetFile {AppName} -t APPL -c {Signature} -a B
  187.  
  188. #------------------------------------------------------------------------------
  189. # Build rule that links our application together. If any of our objects 
  190. # changes, or this makefile changes, then we relink.  The dummy prerequisite
  191. # ShellForce must come before any other prerequisites for {AppName}
  192. #------------------------------------------------------------------------------
  193.  
  194. App68K                ƒ {AppObjects}
  195.     Link {LinkOptions} -o {AppName} {AppObjects} {Libs68K}
  196.     Rez {RezOptions} AppCfrg.r -o {AppName}
  197.  
  198. #------------------------------------------------------------------------------
  199. # Build rule that creates our resources and adds them to the application
  200. #------------------------------------------------------------------------------
  201.  
  202. AppRez                ƒ    {AppName}.make ∂
  203.                         DTS.StyleChat.r ∂
  204.                         AppCfrg.r ∂
  205.                         App.h
  206.     Rez {RezOptions} DTS.StyleChat.r AppCfrg.r -o {AppName}
  207.  
  208. #------------------------------------------------------------------------------
  209. # Rules to build the PowerPC part
  210. #------------------------------------------------------------------------------
  211. AppPPC                ƒ    {AppName}.pef
  212.  
  213. {AppName}.xcoff        ƒ    {AppObjectsPPC}
  214.     PPCLink {LinkOptionsPPC} {AppObjectsPPC} {LibsPPC} -o {AppName}.xcoff
  215.  
  216. #    MakeSym is very timeconsuming, so we only do it if we really need it
  217. {AppName}.xSYM        ƒ {AppName}.xcoff
  218.     IF "{SymOptions}" != ""    && "{SymOptions}" != "-sym off"                
  219.         MakeSym {MakeSymOptions} {AppName}.xcoff -o {AppName}.xSYM
  220.     END
  221.  
  222. {AppName}.pef        ƒ    {AppName}.xcoff {AppName}.xSYM
  223.     MakePef {MakePefOptions} {AppName}.xcoff -o {AppName}
  224.     Rez {RezOptions} -d powerc AppCfrg.r -o {AppName}
  225.